{include file="index/header" /}
<block name="css">
	<script type="text/javascript" charset="utf-8" src="__PUBLIC__admin/UEditor-admin/ueditor.config.js"></script>
	<script type="text/javascript" charset="utf-8" src="__PUBLIC__admin/UEditor-admin/ueditor.all.min.js"> </script>
	<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
	<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
	<script type="text/javascript" charset="utf-8" src="__PUBLIC__admin/UEditor-admin/lang/zh-cn/zh-cn.js"></script>
</block>
<script type="text/javascript" src="__PUBLIC__admin/UEditor-admin/third-party/SyntaxHighlighter/shCore.js"></script>
<link rel="stylesheet" href="__PUBLIC__admin/UEditor-admin/third-party/SyntaxHighlighter/shCoreDefault.css">
<script type="text/javascript">
	SyntaxHighlighter.all();
</script>

<body>
	<div class="panel admin-panel margin-top" id="add">
		<div class="panel-head"><strong><span class="icon-pencil-square-o"></span> 实操点评</strong></div>
		<div class="body-content">
			<form method="post" class="form-x" action="">
				<div class="form-group">
					<div class="label">
						<label>学生账户：</label>
					</div>
					<div class="label" style="width:5%;overflow:inherit">
						<label>{$user.know_remarks ?: $user.know_nickname}-{$user.know_phone ?: $user.know_email}</label>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>学生身份：</label>
					</div>
					<div class="label" style="width:5%;overflow:inherit">
						<label>{$data.user_type}</label>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>学生实操作业：</label>
					</div>
					<div class="field">
						{$data.content}
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>点评：</label>
					</div>
					<div class="field">
						<textarea name="content" id="editor" style="width:845px; height:460px;" data-validate="required:内容为空">{$data.dianping.content}</textarea>
						<div class="tips">点评</div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>是否推荐：</label>
					</div>
					<div class="field">
						<div class="button-group radio">

							<label class="button {if $data.is_tuijian eq 1} active {/if}">
								<span class="icon icon-check"></span>             
								<input name="is_tuijian" value="1" type="radio" {if $data.is_tuijian eq 1}  checked="checked" {/if}>是             
							</label>             

							<label class="button {if $data.is_tuijian eq 0} active {/if}">
								<span class="icon icon-times"></span>            
								<input name="is_tuijian" value="0"  type="radio" {if $data.is_tuijian eq 0}  checked="checked" {/if}>否
							</label>         
						</div>       
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>是否负面：</label>
					</div>
					<div class="field">
						<div class="button-group radio">
							<label class="button {if $data.is_negative eq 1} active {/if}">
								<span class="icon icon-check"></span>
								<input name="is_negative" value="1" type="radio" {if $data.is_negative eq 1}  checked="checked" {/if}>是
							</label>
							<label class="button {if $data.is_negative eq 0} active {/if}">
								<span class="icon icon-times"></span>
								<input name="is_negative" value="0"  type="radio" {if $data.is_negative eq 0}  checked="checked" {/if}>否
							</label> 
						</div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>分数：</label>
					</div>
					<div class="field">
						<input type="number" class="input w50" name="score" value="{$data.score}" data-validate="required:必须评分数,number:必须为数字" min='0' max="10" onkeyup="if(value>10)value=10;if(value<0)value=0"/>
						<div class="tips"></div>
					</div>
				</div>
				<input type="hidden" name="id" value="{$data.id}">
				{notin name='22' value="$admin.role_id"}<div class="form-group">
					<div class="label">
						<label></label>
					</div>
					<div class="field">
						<button class="button bg-main icon-check-square-o" type="submit" onclick="refersh_window()"> 提交</button>
					</div>
				</div>{/notin}
				<input type="hidden" name="course_id" value="{$data.course_id}">
				<input type="hidden" name="id" value="{$data.id}">
				<input type="hidden" value="{$class_id}" name="class_id"  />
			</form>
		</div>
	</div>
</body></html>
<script>
	function refersh_window() {
		setcookie('refersh_time', 1);
	}
	$('#nav').change(function(){
		var nav_id = $(this).val();
		$("#type option:gt(0)").remove();
		if(nav_id == ''){
			return;
		}
		$.ajax({
			type:'GET',
			url :"{:url('getType')}",
			data:'nav_id='+nav_id,
			dataType:'json',
			success : function(data){
				$.each(data, function(k,v){
					$('#type').append('<option value="'+v.type_id+'">'+v.type_name+'</option>');
				});
			}
		});
	});
	var ue = UE.getEditor('editor');
</script>